Optimal. Leaf size=143 \[ -\frac {2 \left (5 a^2-2 b^2\right ) d^2 E\left (\left .\frac {1}{2} (e+f x)\right |2\right )}{5 f \sqrt {\cos (e+f x)} \sqrt {d \sec (e+f x)}}+\frac {14 a b (d \sec (e+f x))^{3/2}}{15 f}+\frac {2 \left (5 a^2-2 b^2\right ) d \sqrt {d \sec (e+f x)} \sin (e+f x)}{5 f}+\frac {2 b (d \sec (e+f x))^{3/2} (a+b \tan (e+f x))}{5 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 143, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3589, 3567,
3853, 3856, 2719} \begin {gather*} -\frac {2 d^2 \left (5 a^2-2 b^2\right ) E\left (\left .\frac {1}{2} (e+f x)\right |2\right )}{5 f \sqrt {\cos (e+f x)} \sqrt {d \sec (e+f x)}}+\frac {2 d \left (5 a^2-2 b^2\right ) \sin (e+f x) \sqrt {d \sec (e+f x)}}{5 f}+\frac {14 a b (d \sec (e+f x))^{3/2}}{15 f}+\frac {2 b (d \sec (e+f x))^{3/2} (a+b \tan (e+f x))}{5 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 3567
Rule 3589
Rule 3853
Rule 3856
Rubi steps
\begin {align*} \int (d \sec (e+f x))^{3/2} (a+b \tan (e+f x))^2 \, dx &=\frac {2 b (d \sec (e+f x))^{3/2} (a+b \tan (e+f x))}{5 f}+\frac {2}{5} \int (d \sec (e+f x))^{3/2} \left (\frac {5 a^2}{2}-b^2+\frac {7}{2} a b \tan (e+f x)\right ) \, dx\\ &=\frac {14 a b (d \sec (e+f x))^{3/2}}{15 f}+\frac {2 b (d \sec (e+f x))^{3/2} (a+b \tan (e+f x))}{5 f}+\frac {1}{5} \left (5 a^2-2 b^2\right ) \int (d \sec (e+f x))^{3/2} \, dx\\ &=\frac {14 a b (d \sec (e+f x))^{3/2}}{15 f}+\frac {2 \left (5 a^2-2 b^2\right ) d \sqrt {d \sec (e+f x)} \sin (e+f x)}{5 f}+\frac {2 b (d \sec (e+f x))^{3/2} (a+b \tan (e+f x))}{5 f}-\frac {1}{5} \left (\left (5 a^2-2 b^2\right ) d^2\right ) \int \frac {1}{\sqrt {d \sec (e+f x)}} \, dx\\ &=\frac {14 a b (d \sec (e+f x))^{3/2}}{15 f}+\frac {2 \left (5 a^2-2 b^2\right ) d \sqrt {d \sec (e+f x)} \sin (e+f x)}{5 f}+\frac {2 b (d \sec (e+f x))^{3/2} (a+b \tan (e+f x))}{5 f}-\frac {\left (\left (5 a^2-2 b^2\right ) d^2\right ) \int \sqrt {\cos (e+f x)} \, dx}{5 \sqrt {\cos (e+f x)} \sqrt {d \sec (e+f x)}}\\ &=-\frac {2 \left (5 a^2-2 b^2\right ) d^2 E\left (\left .\frac {1}{2} (e+f x)\right |2\right )}{5 f \sqrt {\cos (e+f x)} \sqrt {d \sec (e+f x)}}+\frac {14 a b (d \sec (e+f x))^{3/2}}{15 f}+\frac {2 \left (5 a^2-2 b^2\right ) d \sqrt {d \sec (e+f x)} \sin (e+f x)}{5 f}+\frac {2 b (d \sec (e+f x))^{3/2} (a+b \tan (e+f x))}{5 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.72, size = 126, normalized size = 0.88 \begin {gather*} -\frac {2 d^2 (a+b \tan (e+f x))^2 \left (3 \left (5 a^2-2 b^2\right ) \cos ^{\frac {3}{2}}(e+f x) E\left (\left .\frac {1}{2} (e+f x)\right |2\right )+\left (-\frac {15 a^2}{2}+3 b^2\right ) \sin (2 (e+f x))-b (10 a+3 b \tan (e+f x))\right )}{15 f \sqrt {d \sec (e+f x)} (a \cos (e+f x)+b \sin (e+f x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.51, size = 712, normalized size = 4.98
method | result | size |
default | \(-\frac {2 \left (\cos \left (f x +e \right )+1\right )^{2} \left (\cos \left (f x +e \right )-1\right )^{2} \left (15 i \left (\cos ^{3}\left (f x +e \right )\right ) \sin \left (f x +e \right ) \sqrt {\frac {1}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \EllipticF \left (\frac {i \left (\cos \left (f x +e \right )-1\right )}{\sin \left (f x +e \right )}, i\right ) a^{2}-6 i \left (\cos ^{3}\left (f x +e \right )\right ) \sin \left (f x +e \right ) \sqrt {\frac {1}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \EllipticF \left (\frac {i \left (\cos \left (f x +e \right )-1\right )}{\sin \left (f x +e \right )}, i\right ) b^{2}-15 i \left (\cos ^{3}\left (f x +e \right )\right ) \sin \left (f x +e \right ) \sqrt {\frac {1}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \EllipticE \left (\frac {i \left (\cos \left (f x +e \right )-1\right )}{\sin \left (f x +e \right )}, i\right ) a^{2}+6 i \left (\cos ^{3}\left (f x +e \right )\right ) \sin \left (f x +e \right ) \sqrt {\frac {1}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \EllipticE \left (\frac {i \left (\cos \left (f x +e \right )-1\right )}{\sin \left (f x +e \right )}, i\right ) b^{2}+15 i \left (\cos ^{2}\left (f x +e \right )\right ) \sin \left (f x +e \right ) \sqrt {\frac {1}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \EllipticF \left (\frac {i \left (\cos \left (f x +e \right )-1\right )}{\sin \left (f x +e \right )}, i\right ) a^{2}-6 i \left (\cos ^{2}\left (f x +e \right )\right ) \sin \left (f x +e \right ) \sqrt {\frac {1}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \EllipticF \left (\frac {i \left (\cos \left (f x +e \right )-1\right )}{\sin \left (f x +e \right )}, i\right ) b^{2}-15 i \left (\cos ^{2}\left (f x +e \right )\right ) \sin \left (f x +e \right ) \sqrt {\frac {1}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \EllipticE \left (\frac {i \left (\cos \left (f x +e \right )-1\right )}{\sin \left (f x +e \right )}, i\right ) a^{2}+6 i \left (\cos ^{2}\left (f x +e \right )\right ) \sin \left (f x +e \right ) \sqrt {\frac {1}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \EllipticE \left (\frac {i \left (\cos \left (f x +e \right )-1\right )}{\sin \left (f x +e \right )}, i\right ) b^{2}+15 \left (\cos ^{3}\left (f x +e \right )\right ) a^{2}-6 \left (\cos ^{3}\left (f x +e \right )\right ) b^{2}-15 a^{2} \left (\cos ^{2}\left (f x +e \right )\right )+9 b^{2} \left (\cos ^{2}\left (f x +e \right )\right )-10 a \cos \left (f x +e \right ) b \sin \left (f x +e \right )-3 b^{2}\right ) \left (\frac {d}{\cos \left (f x +e \right )}\right )^{\frac {3}{2}}}{15 f \sin \left (f x +e \right )^{5} \cos \left (f x +e \right )}\) | \(712\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.12, size = 182, normalized size = 1.27 \begin {gather*} \frac {-3 i \, \sqrt {2} {\left (5 \, a^{2} - 2 \, b^{2}\right )} d^{\frac {3}{2}} \cos \left (f x + e\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right )\right ) + 3 i \, \sqrt {2} {\left (5 \, a^{2} - 2 \, b^{2}\right )} d^{\frac {3}{2}} \cos \left (f x + e\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right )\right ) + 2 \, {\left (10 \, a b d \cos \left (f x + e\right ) + 3 \, {\left ({\left (5 \, a^{2} - 2 \, b^{2}\right )} d \cos \left (f x + e\right )^{2} + b^{2} d\right )} \sin \left (f x + e\right )\right )} \sqrt {\frac {d}{\cos \left (f x + e\right )}}}{15 \, f \cos \left (f x + e\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (d \sec {\left (e + f x \right )}\right )^{\frac {3}{2}} \left (a + b \tan {\left (e + f x \right )}\right )^{2}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^{3/2}\,{\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________